package ctu.kfad.run.stack;

public class IntegerStackObject extends AStackObject {

    private int i;

    public IntegerStackObject(int i) {
        this.i = i;
    }

    public IntegerStackObject(boolean value) {
        i = value ? 1 : 0;
    }

    public int getIntValue() {
        return i;
    }

    public boolean getBooleanValue() {
        return i != 0;
    }

    @Override
    public byte getType() {
        return INTEGER_STACK_OBJECT;
    }
}
